import java.util.ArrayList;
import java.util.List;
public class FullGC {

    private static long counter = 0;

    private static List<Object> list = new ArrayList<>();

    public static void main(String[] args) {
        int availableProcessors = Runtime.getRuntime().availableProcessors();
        for (int i = 0; i < availableProcessors; i++) {
            new Thread(() -> {
                while (true) {
                    list.add(new User("zzc", 0, "shanghai-beijing"));
                    counter += 1;
                    System.out.println("counter : " + counter);
                }
            }).start();
        }
        System.out.println(availableProcessors);
    }
}
